From: ssmith@weybridge.uk.xensource.com Date: Mon, 4 Sep 2006 15:38:24 +0000 (+0100) Subject: Add support for netif frontends which don't support checksum offload. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15668^2~21 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=114411f240827cfc066e44e8255e44c9391bdb8b;p=xen.git Add support for netif frontends which don't support checksum offload. Signed-off-by: Steven Smith --- diff --git a/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c b/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c index a8b19a65be..6da614fc0c 100644 --- a/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c +++ b/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c @@ -427,6 +427,14 @@ static int connect_rings(struct backend_info *be) be->netif->dev->features |= NETIF_F_TSO; } + if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-no-csum-offload", + "%d", &val) < 0) + val = 0; + if (val) { + be->netif->features &= ~NETIF_F_IP_CSUM; + be->netif->dev->features &= ~NETIF_F_IP_CSUM; + } + /* Map the shared frame, irq etc. */ err = netif_map(be->netif, tx_ring_ref, rx_ring_ref, evtchn); if (err) {